'use strict';

module.exports = app => {
  const { router, controller, middleware } = app;

  // 上传文件
  router.post('/api/upload/file', controller.common.upload.cos);
  // point
  router.get('/api/point/list', controller.business.point.list);
  router.resources('point', '/api/point', controller.business.point);
  // // ----------------------租户----------------------------//
  // // 租户登录/system/auth/login
  // router.post('/api/system/auth/login', controller.system.systemUser.login)
  // // 获取租户信息和权限
  // router.get('/api/system/auth/get-permission-info', middleware.auth(), controller.system.systemUser.getUserInfo)
  // router.resources('/api/system/user', middleware.auth(), controller.system.systemUser);
  // // 租户菜单
  // router.get('/api/system/menu/tree', middleware.auth(), controller.system.systemMenu.tree);
  // router.resources('/api/system/menu', middleware.auth(), controller.system.systemMenu);
  // // 角色
  // router.get('/api/system/role/list', middleware.auth(), controller.system.systemRole.list);
  // router.resources('/api/system/role', middleware.auth(), controller.system.systemRole);
  // // 权限
  // router.get('/api/system/permission/list-user-roles', middleware.auth(), controller.system.systemPermission.getUserRoles);
  // router.post('/api/system/permission/assign-user-role', middleware.auth(), controller.system.systemPermission.updateUserRoles);
  // router.get('/api/system/permission/list-role-menus', middleware.auth(), controller.system.systemPermission.listRoleMenus);
  // router.post('/api/system/permission/assign-role-menu', middleware.auth(), controller.system.systemPermission.updateRoleMenus);
};
